<%@page import="com.ztesoft.framework.util.Utils"%>
<%@page import="com.ztesoft.framework.util.JsonUtil"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="com.ztesoft.framework.util.JsonUtil"%>
<%@page import="java.util.List"%>
<%@page import="com.ztesoft.iocp.common.Constants"%>
<%@ page isELIgnored="false"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<%
    String path = request.getContextPath();
    String webRoot = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path;
	String user=JsonUtil.toJson(request.getSession().getAttribute(Constants.STAFF));
	String buttonMap=JsonUtil.toJson(request.getSession().getAttribute(Constants.STAFF_BUTTON_MAP));
%>
<c:set var="ctx" value="<%=basePath %>" />

<script type="text/javascript">
	//兼容 ie 浏览器
	var console = console || {
	    log : function() {
	        return false;
	    },
	    info:function(){
	    	return false;
	    }
	};
	// 用户session设置
	var session = {};
	session.user = <%=user%>;
	session.user.id=session.user.staffId;
	session.buttonMap=<%=buttonMap%>;
	var parentMid = '<%=request.getParameter("mid")%>';
	
	// 项目根路径，用于引用资源等
	webRoot = '${ctx}/';
	ctx = '${ctx}';
	window.ctx = ctx;
	console.log("ctx:"+ctx);

</script>
<style>
.disable{
	background:url("${ctx}/common/images/bg.png");
	border:2px solid red;
	z-index:9999;
}

.translate{
	border:2px solid #04b400;
	background:url("${ctx}/common/images/t_bg.png");
	z-index:9999;
}
}
</style>
<script type="text/javascript" src="${ctx}/common/privilegePlugin.js"></script>
